package android.demo.library.model;

public class Book {

	private String title;
	private String author;
	private long id;
	private boolean loaned;
	
	public Book(String title, String author) {
		super();
		this.id= Library.getInstance().getNewBookId();
		this.title = title;
		this.author = author;
	}
	public Book() {
		super();
		Library.getInstance().getNewBookId();
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public long getId() {
		return id;
	}
	public void setLoaned(boolean loaned) {
		this.loaned=loaned;
	}
	public boolean isLoaned() {
		return loaned;
	}

	
	public Object[] getFields(){
		return new Object[] {getId(),getTitle(),getAuthor()};
	}
}
